<?php
namespace Admin\Model;
use Think\Model;
class BaseModel extends Model{
    
    protected $tablePrefix="ot_crm_";

    public static function findOrFail($id)
    {
        $row = (new static())->find($id);
        if ($row === null) {
            throw new \Exception("model not exists");
        }
        return $row;
    }
}
